package engine;

import java.awt.Graphics2D;

import resources.manager.ResourceManager;

import com.golden.gamedev.GameEngine;
import com.golden.gamedev.GameObject;
import com.golden.gamedev.object.Background;
import com.golden.gamedev.object.background.ImageBackground;

public class IntroMenu extends GameObject {

	
	Background myBackground;
	public IntroMenu(GameEngine parent) {
		super(parent);
		ResourceManager manager = ResourceManager.getInstance();
		manager.addResourcesFromFile("menus");
		myBackground = new ImageBackground(getImage(manager.getString("title")));
	}

	@Override
	public void initResources() {
		
	}

	@Override
	public void render(Graphics2D g) {
		myBackground.render(g);

	}

	@Override
	public void update(long elapsedTime) {
		myBackground.update(elapsedTime);
		if(click()){
			parent.nextGameID = 1;
			finish();
		}

	}
	
	
}
